/**
 * 论坛列表每项 item组件
 * 
 * 参数: 
 * 	isShowCount: 是否显示 回帖数+浏览量; true-显示, false-不显示; 默认为false
 * 
 */

import {
	Component
} from 'react';
import {
	Tab,
	Button,
	ScrollList,
	Group,
	Boxs,
	Avatar,
	Badge,
	Popup,
	ActionSheet,
	Dialog,
	Toast,
	Grid,
} from 'saltui';
const {
	IconButton
} = Button;
const {
	HBox,
	Box
} = Boxs;

import PageController from 'pages/home';
import {
	urlPrefix,
	URLS,
	nodataIcon,
	dictMap
} from '../../app/variables';
import DB from '../../app/db';

export default class PostPageItem extends Component {
	constructor(props) {
		super(props);
		//console.log(props);
		var context = document.getElementById("context").value;
		this.state = {
			option: [],
			isShowLabel:props.isShowLabel,
			pagetype: props.pagetype,
			isShowCount: props.isShowCount,
			type: props.type,
			urlPrev: context + '/api/m/plugin/attachment/mobile/viewImage?fid=',
			context:context,	
		}

		this.photoTypeSuffixArray = ['.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.gif', '.GIF', '.bmp', '.BMP'];

		this.OPERATE = [{
			name: '查看',
			code: 'detail'
		},{
			name: '编辑',
			code: 'edit'
		}, {
			name: '置顶',
			code: 'top'
		}, {
			name: '取消置顶',
			code: 'untop'
		}, {
			name: '标签',
			code: 'label'
		}, {
			name: '删除',
			code: 'delete'
		}, {
			name: '审核',
			code: 'check'
		}];

	}

	componentWillMount() {
		//this.judgeOperate();	
	}

	judgeOperate() {
		let option = this.generateIndependentOptions();
		// 根据每一项的信息判断是否显示options
		// 所有列表页面
		let isModerator = this.props.isModerator;
		let isAuthor = this.props.isAuthor;
		let isAdminRole = this.props.isAdminRole
		//alert("isModerator:" + isModerator + ";isAuthor:" + isAuthor);
		if (this.props.pagetype == 'all') {	
			if(isAdminRole){
				this.pushInIndependentOptions(option, 'detail');
				this.pushInIndependentOptions(option, 'edit');
				if (this.props.is_top == 0) {
						this.pushInIndependentOptions(option, 'top');
				} else {
					this.pushInIndependentOptions(option, 'untop');
				}
				this.pushInIndependentOptions(option, 'label');
				this.pushInIndependentOptions(option, 'delete');
			}else{
				this.pushInIndependentOptions(option, 'detail');
				if (isModerator == 1) {
					if (this.props.type == 1) {
						if (this.props.is_top == 0) {
							this.pushInIndependentOptions(option, 'top');
						} else {
							this.pushInIndependentOptions(option, 'untop');
						}
					}
					this.pushInIndependentOptions(option, 'label');
					this.pushInIndependentOptions(option, 'delete');
				}else if(isAuthor == 1){
					this.pushInIndependentOptions(option, 'edit');
					this.pushInIndependentOptions(option, 'delete');
				}else{

				}
			}
		}
		// 我的帖子
		if (this.props.pagetype == 'mypost') {
			if(isAdminRole){
				this.pushInIndependentOptions(option, 'edit');
				this.pushInIndependentOptions(option, 'delete');
			}else if (isModerator == 1) {
				this.pushInIndependentOptions(option, 'edit');
				this.pushInIndependentOptions(option, 'delete');
			}else if(isAuthor == 1){
				this.pushInIndependentOptions(option, 'edit');
				if(this.props.isCheck != 1){
					this.pushInIndependentOptions(option, 'delete');
				}
			}
		}
		if (this.props.pagetype == 'myreply') {
			if (isModerator == 1) {
				this.pushInIndependentOptions(option, 'edit');
				this.pushInIndependentOptions(option, 'delete');
			}
		}
		// 待我审核
		if (this.props.pagetype == 'uncheck') {
			this.pushInIndependentOptions(option, 'check');
			this.pushInIndependentOptions(option, 'edit');
			this.pushInIndependentOptions(option, 'delete');
		}
		return option;
	}

	/**
	 * 生成独立操作空间(数组)
	 * @return {[type]}
	 */
	generateIndependentOptions() {
		return new Array();
	}

	/**
	 * 获取操作改变
	 * @param  {[type]}
	 * @return {[type]}
	 */
	acquireOptionWithName(n) {

		let s;
		this.OPERATE.map((item, index) => {
			if (item.code == n) {
				s = item;
				return item;
			}
		});
		return s;
	}

	/**
	 * 获取独立空间中操作选项的名称
	 * @param  {[type]}
	 * @return {[type]}
	 */
	acquireIndependentOptionsName(options) {
		
		let names = [];
		if (options && options.length > 0) {
			options.map((item, index) => {
				names.push(item.name);
			});
		}
		return names;
	}

	/**
	 * 根据code获取操作放入独立空间
	 * 
	 * @param  {[type]}
	 * @param  {[type]}
	 * @return {[type]}
	 */
	pushInIndependentOptions(options, code) {

		if (options instanceof Array) {
			let n = this.acquireOptionWithName(code);
			options.push(n);
		}
		return options;
	}

	/**
	 * 单独处理审核帖子页面不通过操作
	 */
	unPass(){
		let id = this.props.data.id;
		let route = "myCheckList";
		location.hash = 'post/unCheck/' + id +'/' +route;
	}

	/**
	 * 单独处理审核帖子页面通过操作
	 */
	pass(){
		let id = this.props.data.id;
		Dialog.confirm({
			title: '提示',
		   // locale: 'en_US',
		   content: "确定审核通过吗?",
		   onConfirm: this.returnCheck.bind(this,id),
		   onCancel: (var1) => {
			   console.log('confirm cancel');
		   },
	   });
	}

	returnCheck(ids){
		DB.ForumModuleAPI.returnPost({
			id:this.props.data.id,
		}).then((content) =>{
			Dialog.alert({
				title: '提交',
				content: '审核成功',
			});
			this.props.flushData()
		}).catch((error) => {
			Toast.show({
				type: 'error',
				content: '提交出错'
			});
		})
	}


	/**
	 * 帖子列表每一项的点击事件
	 * @return {[type]}
	 */
	handleListItemClick() {
		let postId = this.props.id;
		// this.props.changeSkipId(postId);
		// this.props.changePageNum(this.props.pagecount);
		if (this.props.type == 2) {
			postId = this.props.postId;
		}
		if(this.state.pagetype == 'draft'){
			location.hash = 'post/edit/' + this.props.id + '/' + this.props.checkStatus + '/' + this.props.author+'/'+this.props.pagetype;
		}else{
			//将ischeck替换成pagetype
			//pageSkip('static/officeding/forum/dist/index.html', "#/post/view/" + postId + '/' + this.props.checkStatus + '/' + this.props.isModerator + '/' + this.props.author + '/' + this.props.isAuthor + '/' + this.state.pagetype);
			if(this.props.addClickAble){
				//pageSkip('static/officeding/forum/dist/index.html', "#/post/view/" + postId + '/' + this.props.checkStatus + '/' + this.props.isModerator + '/' + this.props.author + '/' + this.props.isAuthor + '/' + this.state.pagetype);
				location.hash = "#/post/view/" + postId + '/' + this.props.checkStatus + '/' + this.props.isModerator + '/' + this.props.author + '/' + this.props.isAuthor + '/' + this.state.pagetype;
			}else{
				this.props.changeClickAble();
			}
			
		}
		
	}

	checkViewPost(){
		let postId = this.props.data.id;
		location.hash = "#/post/view/" + postId + '/' + this.props.checkStatus + '/' + this.props.isModerator + '/' + this.props.author + '/' + this.props.isAuthor + '/' + this.props.pagetype;

	}

	/**
	 * 帖子列表 操作按钮的点击触发事件
	 *  所有帖子: 版主+管理员 -- 编辑/置顶/标签/删除; 一般用户: 查看
	 *  我的发帖: 一般用户: 
	 * @return {[type]}
	 */
	handleOperateClick() {
		let  option=this.judgeOperate();
		// debugger;
		//console.log(option);
		let t = this;
		// 显示下拉菜单a
		ActionSheet.show({
				options: t.acquireIndependentOptionsName(option),
				maskClosable: true,
			},
			t.clickOperateItem.bind(t, option));

	}

	/**
	 * 对每一个帖子的操作面板按钮的点击触发事件
	 * @param  {[type]}
	 * @param  {[type]}
	 * @return {[type]}
	 */
	clickOperateItem(option, index) {
		//console.log(index);
		// click cancel button;
		if (index == -1) {
			return;
		}
		let opt = option[index];
		// top
		if (opt.code == 'top') {
			this.showConfirm(opt.code, '确定' + opt.name+'该帖子吗？', {
				id: this.props.id
			});
		} else if (opt.code == 'untop') {
			this.showConfirm(opt.code, '确定' + opt.name+'该帖子吗？', {
				id: this.props.id
			});
		} else if (opt.code == 'delete') {
			// delete
			this.showConfirm(opt.code, '确定要删除吗？', {
				id: this.props.id
			});
		} else if (opt.code == 'edit') {
			if (this.state.type == 1) {
				// 主题帖
				location.hash = 'post/edit/' + this.props.id + '/' + this.props.checkStatus + '/' + this.props.author+'/'+this.props.pagetype;
				
			} else if (this.state.type == 2) {
				// 回帖
				location.hash = 'post/reply/' + this.props.postId + '/' + this.props.boardId + '/' + this.props.id + '/undefined/' + this.props.author + '/' + this.props.checkStatus;
				

			}
		} else if (opt.code == 'check') {
			this.showConfirm(opt.code, '确定审核通过吗？', {
				id: this.props.id
			});
		} else if(opt.code == 'label'){//标签。。。只对主题帖进行标签			
			if (this.state.type == 1) {
				// 主题帖
				location.hash = 'post/label/' + this.props.id;
			}
		} else if (opt.code == 'detail') {
			this.handleListItemClick();
		}
	}

	/**
	 * 操作面板点击后页面显示操作确认框
	 * @param  {[type]}
	 * @param  {[type]}
	 * @param  {[type]}
	 * @return {[type]}
	 */
	showConfirm(optionCode, content, param) {
		Dialog.confirm({
			title: '提示',
		   // locale: 'en_US',
		   content: content,
		   onConfirm: this.confirmDialogButton.bind(this, optionCode, param),
		   onCancel: (var1) => {
			   console.log('confirm cancel');
		   },
	   });
	}

	/**
	 * 页面操作确认框的 确定按钮点击事件
	 * @param  {[type]}
	 * @param  {[type]}
	 * @return {[type]}
	 */
	confirmDialogButton(optionCode, argParam) {
		var num = this.props.activeValue;
		if (optionCode == 'top' || optionCode == 'untop') {
			let param = {
				id: argParam.id
			};
			DB.ForumModuleAPI.topPost(param).then((content) => {
				Toast.show({
					type: 'success',
					content: '操作成功',
				});
				this.props.flushData();
			}).catch((error) => {
				Toast.show({
					type: 'error',
					content: error.errorMsg,
				});
				this.props.flushData();
			});
		} else if (optionCode == 'label') {
			
			
		} else if (optionCode == 'delete') {
			let param = {
				ids: argParam.id
			};
			DB.ForumModuleAPI.deletePost(param).then((content) => {
				Toast.show({
					type: 'success',
					content: '删除成功',
				});
				this.props.flushData();
			}).catch((error) => {
				Toast.show({
					type: 'error',
					content: error.errorMsg,
				});
				this.props.flushData();
			});
		} else if (optionCode == 'check') {
			let param = {
				ids: argParam.id
			};
			DB.ForumModuleAPI.checkPost(param).then((content) => {
				Toast.show({
					type: 'success',
					content: '审核成功',
					duration:3000
				});
				this.props.flushData();
			}).catch((error) => {
				Toast.show({
					type: 'error',
					content: error.errorMsg,
				});
				this.props.flushData();
			});
		}
	}
	
	/**
	 * 点击图片的事件
	 * @param  {[type]}
	 * @return {[type]}
	 */
	handleClickImage(imageId) {
		console.log(imageId);
	}

	render() {
		var token = document.getElementById("token").value;
		var url=this.state.urlPrev;
		var context=this.state.context;
		let t = this;
		var isTop=this.props.is_top;
		var isEssence=this.props.isEssence;

		let isShowCount = false;
		if (this.props.isShowCount) {
			isShowCount = this.props.isShowCount;
		}
		var isShow = this.state.isShowLabel;
		var numcount = isTop&&isShow ? 2 : 2;
		let labels_html1;
		let labels_html2;
		let check_html;
		let countNum = 0;
		if(this.state.pagetype!='mypost'){
			if (this.props.labels && this.props.labels.length > 0) {
				labels_html1 = this.props.labels.map((item, index) => {
					if(countNum<numcount){
						if (item.checked == true) {
							var labelColor = "t-tag-"+item.color+" t-ML6";
							var labelName = item.name;
							if(labelName =="公告" || labelName=="精华"){
							   countNum++;
							   return (<span className={labelColor}>{labelName}</span>);
							}	
						}
					}
				});
				labels_html2 = this.props.labels.map((item, index) => {
					if(countNum<numcount){
						if (item.checked == true) {
							var labelColor = "t-tag-"+item.color+" t-ML6";
							var labelName = item.name;
							if(labelName !="公告" && labelName !="精华"){
							    countNum++;
						     	return (<span className={labelColor}>{labelName}</span>);
							}	
						}
					}
				});
			}
		}else{
			if(this.props.checkStatus == '1'){
				check_html = (<div flex={1}><span className="light-badge badge-lightorange t-MR4" >审核中</span></div>);
			}else if(this.props.checkStatus == '3'){
				check_html = (<div flex={1}><span className="light-badge badge-lightgrey t-MR4" >审核未通过</span></div>);
			}

			
		}
		
		let photo_html="";
		let photosize = 0;
		let num = this.props.imageNum;
		if (this.props.attIdJson && this.props.attIdJson.length > 0) {
				photo_html = this.props.attIdJson.map((item, index) => {
					if ( this.photoTypeSuffixArray.indexOf(item.fileExt) != -1 && photosize < 3) {
						var imageContent=url+item.id+'&token='+token;
						photosize++;
						if(num>=3){
							return (

								<Box flex={1} className="t-OFH t-P4" style={{ width: "30%", height: "88px" }}>
								<img className="t-R4" style={{ width: "100%", height: "100%" }} src={imageContent} onClick={t.handleClickImage.bind(t, item.id)} />
								</Box>
							);
						}else{
							if(photosize==1){
								if(num==1){
									return(
										<Box flex={1} className="t-OFH t-P4 t-PL0 t-PR0">
										  <img className="t-R4" style={{ width: "100%", height: "200px", objectFit: "cover" }}  src={imageContent}  onClick={t.handleClickImage.bind(t, item.id)}/>
										</Box>
									);
								}
								if(num==2){
									return(
										<Box className="t-MR10" style={{ width: "31.6%", height: "80px" }}>
                    					  <img className="t-R4 t-ML10" src={imageContent} style={{ width: "100%", height: "100%"}}  onClick={t.handleClickImage.bind(t, item.id)}/>
                    					</Box>
									);
								}
						  }
						}
					}
				});
		}
		if(this.state.pagetype=='myreply'||this.state.pagetype=='mypost'){
			num = 0;
			photo_html = "";
		}
		if(this.state.pagetype != 'myCheck'){
			return (
				<Group>
					<Group.List lineIndent={60} borderTopNone={true} key={this.props.id} >
	
					<Box className="t-BCf">
						{
							num == 0?
							<div className="t-PT16 t-PB16 t-PL16 t-PR16" id={this.props.id} onClick={t.handleListItemClick.bind(this)}>
							  <Box>
								<Box flex={1}  className="t-FC3 t-FS16 t-LH1_4">
									{this.props.title}
									{ isTop==1 && this.state.isShowLabel?<span className="iconfont icon-istop t-MR6 t-FS20" style={{color:'#4799e7'}}></span>:''}
									{ isEssence==1 && this.state.isShowLabel?<span className="iconfont icon-essence t-MR6 t-FS20" style={{color:'#ff9b43'}}></span>:''}
									{
										this.state.pagetype == "all" ? 
										<span>
											
										</span>
										: 
										<span>
											{
												this.state.isShowLabel?
												<span>
													{labels_html1}{labels_html2}
			
												 </span>
												:
												<span>
													{labels_html1}{labels_html2}
												</span>
											 }
										</span>
									}
								</Box>
								<Box className="t-MT8">
									<div className="t-FL t-FCddfontblue-40 t-FS14 t-MR6  t-omit">
										{this.props.isPetname==1?this.props.petname:this.props.authorName}
									</div>
									{check_html}
									<div className={this.state.pagetype=='draft'?'t-DN':'t-FR t-FCddfontblue-40 t-FS14 t-FAR t-P2'} style={{ marginTop: "-4" }}>
									<i className="iconfont icon-eye t-FS14 t-MR6" ></i>{this.props.viewCount == null ? '0' : this.props.viewCount}
									</div>
									<div className={this.state.pagetype=='draft'?'t-DN':'t-FR t-FCddfontblue-40 t-FS14 t-FAR t-P2 t-MR10'} style={{ marginTop: "-4" }}>
									<i className="iconfont icon-messages t-FS14 t-MR6"></i>{this.props.replyCount == null ? '0' : this.props.replyCount}
									</div>
									<div className="t-CL"></div>
								</Box>
							  </Box>
							</div>:""
						}
						
						{
							num==2?
							
							<div className="t-PT16 t-PB14 t-PL16 t-PR16" id={this.props.id} onClick={t.handleListItemClick.bind(this)}>
							  <HBox>
								<Box flex={1} className="t-PR">
								  <Box className="t-FC3 t-FS16 t-LH1_4">
									  <span className="t-FL t-MB6" style={{display:'inline',minHeight:'60px'}}> 
									  {this.props.title}
									  { isTop==1 && this.state.isShowLabel?<span className="iconfont icon-istop t-MR6 t-FS20" style={{color:'#4799e7'}}></span>:''}
									  { isEssence==1 && this.state.isShowLabel?<span className="iconfont icon-essence t-MR6 t-FS20" style={{color:'#ff9b43'}}></span>:''} 
									  {
										this.state.pagetype == "all" ? 
										<span>
											
										</span>
										: 
										<span>
											{
												this.state.isShowLabel?
												<span>
													
													{labels_html1}{labels_html2}
			
												 </span>
												:
												<span>
													 {labels_html1}{labels_html2}
												</span>
											 }
										</span>
									}
									  </span>
								  </Box>
								  <div className="t-CL"></div>
									<Box>
									  <div className="t-FL t-FCddfontblue-40 t-FS14  t-omit">
									  	{this.props.isPetname==1?this.props.petname:this.props.authorName}
									  </div>
									  {check_html}
									 <div className={this.state.pagetype=='draft'?'t-DN':'t-FR t-FCddfontblue-40 t-FS14 t-FAR t-P2 t-MR4'} style={{ marginTop: "-4" }}>
											<i className="iconfont icon-eye t-FS14 t-MR6" ></i>{this.props.viewCount == null ? '0' : this.props.viewCount}
									 </div>
									  <div className={this.state.pagetype=='draft'?'t-DN':'t-FR t-FCddfontblue-40 t-FS14 t-FAR t-P2 t-MR10'} style={{ marginTop: "-4" }}>
										<i className="iconfont icon-messages t-FS14 t-MR6"></i>{this.props.replyCount == null ? '0' : this.props.replyCount}
									  </div>
									  <div className="t-CL"></div>
									</Box>
								</Box>
								  {photo_html}
							  </HBox>
							</div>:""
						}
						{
							num==1?
							<div className="t-PT16 t-PB14 t-PL16 t-PR16" id={this.props.id} onClick={t.handleListItemClick.bind(this)}>
								<Box vAlign="center">
									<Box className="t-FC3 t-omit2 t-FS16 t-MB6 t-LH1_4">
									{this.props.title}
									{ isTop==1 && this.state.isShowLabel?<span className="iconfont icon-istop t-MR6 t-FS20" style={{color:'#4799e7'}}></span>:''}
									{ isEssence==1 && this.state.isShowLabel?<span className="iconfont icon-essence t-MR6 t-FS20" style={{color:'#ff9b43'}}></span>:''}
									{
										this.state.pagetype == "all" ? 
										<span>
											
										</span>
										: 
										<span>
											{
												this.state.isShowLabel?
												<span>
													{labels_html1}{labels_html2}
			
												 </span>
												:
												<span>
													{labels_html1}{labels_html2}
												</span>
											 }
										</span>
									}
									</Box>
									<HBox className="t-FBJ t-MT4 t-OFH " style={{ marginLeft: "-2px", marginRight: "-2px" }}>
                     					 <Box flex={1} className="t-OFH t-P4">{photo_html}</Box>
                   					</HBox>
									<Box className="t-MT0">
										<div className="t-FL t-FCddfontblue-40 t-FS14  t-omit">
											{this.props.isPetname==1?this.props.petname:this.props.authorName}
										</div>
											{check_html}
										<div className={this.state.pagetype=='draft'?'t-DN':'t-FR t-FCddfontblue-40 t-FS14 t-FAR t-P2 t-MR4'} style={{ marginTop: "-4" }}>
											<i className="iconfont icon-eye t-FS14 t-MR6" ></i>{this.props.viewCount == null ? '0' : this.props.viewCount}
										</div>
										<div className={this.state.pagetype=='draft'?'t-DN':'t-FR t-FCddfontblue-40 t-FS14 t-FAR t-P2 t-MR10'} style={{ marginTop: "-4" }}>
											<i className="iconfont icon-messages t-FS14 t-MR6"></i>{this.props.replyCount == null ? '0' : this.props.replyCount}
										</div>
										<div className="t-CL"></div>
                    				</Box>
								</Box>
							</div>:""
						}
						{
							num>=3?
							<div className="t-PT16 t-PB14 t-PL16 t-PR16 " id={this.props.id} onClick={t.handleListItemClick.bind(this)}>
							  <Box vAlign="center">
								<Box flex={1} className="t-FC3 t-omit2 t-FS16 t-MB6 t-LH1_4">
								   {this.props.title}
								   { isTop==1 && this.state.isShowLabel?<span className="iconfont icon-istop t-MR6 t-FS20" style={{color:'#4799e7'}}></span>:''}
								   { isEssence==1 && this.state.isShowLabel?<span className="iconfont icon-essence t-MR6 t-FS20" style={{color:'#ff9b43'}}></span>:''}
								   {
										this.state.pagetype == "all" ? 
										<span>
											
										</span>
										: 
										<span>
											{
												this.state.isShowLabel?
												<span>
													{labels_html1}{labels_html2}
			
												 </span>
												:
												<span>
													{labels_html1}{labels_html2}
												</span>
											 }
										</span>
									}
								</Box>
								<HBox className="t-FBJ t-MT4 t-OFH " style={{ marginLeft: "-2px", marginRight: "-2px" }}>
									{photo_html}
								</HBox>
								<Box className="t-MT4">
									<div className="t-FL t-FCddfontblue-40 t-FS14  t-omit">
										{this.props.isPetname==1?this.props.petname:this.props.authorName}
									</div>
									{check_html}
									<div className={this.state.pagetype=='draft'?'t-DN':'t-FR t-FCddfontblue-40 t-FS14 t-FAR t-P2'} style={{ marginTop: "-4" }}>
										<i className="iconfont icon-eye t-FS14 t-MR6" ></i>{this.props.viewCount == null ? '0' : this.props.viewCount}
									</div>
									<div className={this.state.pagetype=='draft'?'t-DN':'t-FR t-FCddfontblue-40 t-FS14 t-FAR t-P2 t-MR10'} style={{ marginTop: "-4" }}>
										<i className="iconfont icon-messages t-FS14 t-MR6"></i>{this.props.replyCount == null ? '0' : this.props.replyCount}
									</div>
									<div className="t-CL"></div>
								</Box>
							  </Box>
							</div>:""
						}
					</Box>
			  </Group.List>
					<div className="t-H10 t-BCf7"></div>
				</Group>
			);
		//如果是进入审核帖子页面
		}else{
			let AvatarHtml = "";
			AvatarHtml = (this.props.data.image!=null&&this.props.data.image!="")  ?
			<Avatar className="t-MB6" style={{top: '-3',right:'-7'  }} src={url+this.props.data.image+'&token='+token}  size={40}/>
			:
			<Avatar name={this.props.data.authorName}  className="t-MB6" style={{ top: '-3',right:'-7'  }} size={40}/>
			return(
				<Box className="t-BCf  t-MT10 t-M16 t-MB0  t-R4 ">
				<div className="t-PL14 t-PT12 t-PB12 dd-bottom-border">{this.props.data.title}</div>
				<div className="t-ML12 t-MT16 t-FL"  style={{ width:'55' }} onClick={t.checkViewPost.bind(this)}>
				{AvatarHtml}
				<div>
				<span className="t-FS14 t-FC3 t-omit t-FAC" style={{width:'56',height:'14'}}>{this.props.data.authorName}</span>
				</div>
				</div>
				<div className="t-MT16 t-PR t-FCddfontblue-60" style={{ marginLeft: '80px', top: '-7px', lineHeight: '24px', letterSpacing: '1px' }} onClick={t.checkViewPost.bind(this)}>
				  <p>
					<span>论坛类别</span>
					<span className="t-ML4 t-MR4">:</span>
					<span>{this.props.data.typeName}</span>
				  </p>
	
				  <p>
					<span>版块名称</span>
					<span className="t-ML4 t-MR4">:</span>
					<span>{this.props.data.boardName}</span>
				  </p>
	
				  <p>
					<span>发布时间</span>
					<span className="t-ML4 t-MR4">:</span>
					<span>{this.props.data.publishTime}</span>
				  </p>
				</div>
				<div className="t-FR t-MR12 t-MB10" style={{ marginTop: '1' }}>
				  <Button className="t-MR8" type="secondary" size="small" display="inline" onClick={this.unPass.bind(this)}>不通过</Button>
				  <Button type="secondary" size="small" display="inline" onClick={this.pass.bind(this)}>通过</Button>
				</div>
			  </Box>
			);
		}
	}
}